package main

import (
	_ "github.com/go-sql-driver/mysql"
	_ "neecola.com/learngo/family_security/models"
	_ "neecola.com/learngo/family_security/routers"

	"github.com/astaxie/beego"
	"neecola.com/learngo/family_security/models"
)

func main() {
	beego.BConfig.WebConfig.Session.SessionOn = true
	beego.BConfig.WebConfig.Session.SessionName = "app2pr"
	// b
	beego.AddFuncMap("ExIo", ExIo)
	beego.Run()
}

func ExIo(p *models.UserInfo) models.UserInfo {
	info := models.UserInfo{}
	info.Phone = p.Phone
	info.PassWord = p.PassWord
	info.Mac = p.Mac
	info.RegisterTime = p.RegisterTime
	return info
}
